import { createStore } from 'vuex'
// createStore 创建vuex 实例
export default createStore({
    state: {
      count:1
    },
    mutations: {
      changeCount(state,num){
          state.count+=num
      }
    },
    actions: {
      countActions({commit},num){
        commit("changeCount",num)
      }
    },
    getters:{
      douCount:(state)=>state.count*2
    },
    modules: {
    }
})
